<div class="my-table">
  <nz-table #borderedTable nzBordered [nzData]="dataSet"
    [nzShowPagination]="false"
    [nzLoading]="nzLoading"
  >
    <thead>
      <tr>
        <th *ngIf="serial">{{ serial }}</th>
        <th *ngFor="let colName of colNames">{{ colName }}</th>
        <th *ngIf="operates.length>0">操作</th>
      </tr>
    </thead>
    <tbody>
      <tr *ngFor="let data of dataSet; let i = index">
        <td *ngIf="serial">{{ i + 1 }}</td>
        <td [nzAlign]="item.value?.money?'right' : 'left' " *ngFor="let item of data | keys">
          <span style="display: flex;align-items: center;" *ngIf="item.value?.status">
            <span style="display: flex;align-items: center;margin-right: 8px;">
              <span *ngIf="item.value?.flag == '0'"
                style="display: flex; background-color: #62CBCD;width: 6px;height: 6px;border-radius: 6px;"
              ></span> <!-- 提交 -->
              <span *ngIf="item.value?.flag == '1'"
                style="display: flex; background-color: #5CC171;width: 6px;height: 6px;border-radius: 6px;"
              ></span> <!-- 提交 -->
              <span *ngIf="item.value?.flag == '2'"
                style="display: flex; background-color: #02ADBC;width: 6px;height: 6px;border-radius: 6px;"
              ></span> <!-- 提交 -->
              <span *ngIf="item.value?.flag == '3'"
                style="display: flex; background-color: #CFCFCF;width: 6px;height: 6px;border-radius: 6px;"
              ></span> <!-- 提交 -->
              <span *ngIf="item.value?.flag == '4'"
                style="display: flex; background-color: #FF9800;width: 6px;height: 6px;border-radius: 6px;"
              ></span> <!-- 提交 -->
              <span *ngIf="item.value?.flag == '5'"
                style="display: flex; background-color: #FF9800;width: 6px;height: 6px;border-radius: 6px;"
              ></span> <!-- 提交 -->
            </span>
            <span>{{ item.value.value }}</span>
          </span>
          <span *ngIf="item.value?.money">
            <span>{{ item.value.value }}</span>
          </span>
          <span *ngIf="!(item.value?.money || item.value?.status)">
            <span [title]="item.value">{{ isSplice && (item.value?.length > 25) ? item.value.substr(0, 25)+'...' : item.value }}</span>
          </span>
        </td>
        <td *ngIf="operates.length>0">
          <span *ngFor="let operate of operates; let i=index">
            <!-- <a *ngIf="operate.router"  [routerLink]="operate.router"> {{ operate.key }} </a> -->
            <a style="margin-right: 5px; color:#02ADBC;" (click)="parentClick(data, i)"> {{ operate.key }} </a>
          </span>
        </td>
      </tr>
    </tbody>
  </nz-table>
  <div class="my-table-pagination" *ngIf="isPagination">
    <ng-template #totalTemplate let-total>共 {{ nzTotal }} 条</ng-template>
    <nz-pagination 
      [nzShowTotal]="totalTemplate" 
      nzShowSizeChanger 
      [nzPageSizeOptions]="pageSizeOptions"
      [nzTotal]="nzTotal"
      [(nzPageSize)]="nzPageSize"
      [(nzPageIndex)]="nzPageIndex"
      (nzPageSizeChange)="nzPageSizeChange()"
      (nzPageIndexChange)="nzPageIndexChange()"
    ></nz-pagination>
  </div>

  <ng-template #noResultTemplate>
    <div class="no-result">
      <nz-empty
        nzNotFoundImage="assets/images/common/empty.svg"
        [nzNotFoundContent]="nzNotFoundContent"
      ></nz-empty>
    </div>
  </ng-template>
</div>
